﻿<classes:MSHPhoneApplicationPage 
    x:Class="WP7Client.UserInterface.Pages.LoginPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WP7"
    xmlns:classes="clr-namespace:WP7Client.Classes"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True" Loaded="MSHPhoneApplicationPage_Loaded">
    <classes:MSHPhoneApplicationPage.Resources>
        <classes:BooleanToInvertedBooleanConverter x:Key="BooleanToInvertedBooleanConverter"/>
        <classes:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
    </classes:MSHPhoneApplicationPage.Resources>

    <Grid x:Name="LayoutRoot" Background="Transparent" Visibility="{Binding Path=Starting, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=invert, Mode=TwoWay}">
        <controls:Pivot Title="MY SOCIAL HUB" IsEnabled="{Binding Loading, Converter={StaticResource BooleanToInvertedBooleanConverter}}">
            <controls:PivotItem Header="Login">
                <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Username:"/>
                        <TextBox Text="{Binding Path=Username, Mode=TwoWay}"/>
                        <TextBlock Text="Password:"/>
                        <PasswordBox Password="{Binding Path=Password, Mode=TwoWay}"/>
                        <Button Content="Login" HorizontalAlignment="Left" cmd:ButtonBaseExtensions.Command="{Binding LoginCommand}"/>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Not a member?" FontSize="24" />                            
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <HyperlinkButton Content="Register a new account." HorizontalAlignment="Left" NavigateUri="/UserInterface/Pages/RegistrationPage.xaml"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Forgot your password?" FontSize="24" />                            
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <HyperlinkButton Content="Reset your password." HorizontalAlignment="Left" NavigateUri="/UserInterface/Pages/ResetPasswordPage.xaml"/>                            
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Changed your password?" FontSize="24" />                           
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <HyperlinkButton Content="Activate your new password." HorizontalAlignment="Left" NavigateUri="/UserInterface/Pages/ActivateNewPasswordPage.xaml"/>
                        </StackPanel>
                    </StackPanel>
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
        <ProgressBar Name="ProgressBar" VerticalAlignment="Top" IsIndeterminate="{Binding Loading}"/>
    </Grid>
    
</classes:MSHPhoneApplicationPage>
